package com.hsylient.servlet;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet(name = "WelcomeServlet", value = "/welcome")
public class WelcomeServlet implements Servlet {

    // 无参构造
    public WelcomeServlet() {
        System.out.println("WelcomeServlet.Constructor execute!");
    }

    @Override
    public void init(ServletConfig arg0) throws ServletException {
        System.out.println("HelloServlet.init() method execute!");
    }

    @Override
    public void service(ServletRequest request, ServletResponse response) {
        System.out.println("HelloServlet.service() method execute!");
    }

    @Override
    public void destroy() {
        System.out.println("HelloServlet.destroy() method execute!");
    }

    @Override
    public ServletConfig getServletConfig() {
        return null;
    }

    @Override
    public String getServletInfo() {
        return null;
    }
}
